package com.shopyourstyle.activities;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.shopyourstyle.R;

public class LoginActivity extends Activity {
	private String MSG_TAG = "LoginActivity";
	
	private Button loginBtn = null;
	private Button registerBtn = null;
	private EditText usernameEdt = null;
	private EditText passwordEdt = null;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);
        Log.d(MSG_TAG, "OnCreate()");
        findView();
        setListener();
    }
    
    private void findView() {
    	loginBtn = (Button)findViewById(R.id.login_login);
    	registerBtn = (Button)findViewById(R.id.login_register);
    	usernameEdt = (EditText)findViewById(R.id.login_username);
    	passwordEdt = (EditText)findViewById(R.id.login_password);		
    }
	private void setListener() {
		loginBtn.setOnClickListener(loginBtnLs);
		registerBtn.setOnClickListener(registerBtnLs);
	}
	
	private Button.OnClickListener loginBtnLs=new Button.OnClickListener(){
		@Override
		public void onClick(View v) {
//			TODO
			if(true){
				Intent intent = new Intent();
				intent.setClass(LoginActivity.this,CharacterActivity.class);
				startActivity(intent);
				finish();
			}
		}
	};
	
	private Button.OnClickListener registerBtnLs=new Button.OnClickListener(){
		@Override
		public void onClick(View v) {
			Intent intent = new Intent();
			intent.setClass(LoginActivity.this,RegisterActivity.class);
			startActivity(intent);
		}
	};
}